Integrand size = 13, antiderivative size = 92 \[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=\frac {(b-a \cos (x)) \csc ^2(x)}{2 \left (a^2-b^2\right )}+\frac {(a+2 b) \log (1-\cos (x))}{4 (a+b)^2}-\frac {(a-2 b) \log (1+\cos (x))}{4 (a-b)^2}-\frac {b^3 \log (a+b \cos (x))}{\left (a^2-b^2\right )^2} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2747, 755, 815} \[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=\frac {\csc ^2(x) (b-a \cos (x))}{2 \left (a^2-b^2\right )}-\frac {b^3 \log (a+b \cos (x))}{\left (a^2-b^2\right )^2}+\frac {(a+2 b) \log (1-\cos (x))}{4 (a+b)^2}-\frac {(a-2 b) \log (\cos (x)+1)}{4 (a-b)^2} \]
[In]
[Out]
Rule 755
Rule 815
Rule 2747
Rubi steps \begin{align*} \text {integral}& = -\left (b^3 \text {Subst}\left (\int \frac {1}{(a+x) \left (b^2-x^2\right )^2} \, dx,x,b \cos (x)\right )\right ) \\ & = \frac {(b-a \cos (x)) \csc ^2(x)}{2 \left (a^2-b^2\right )}-\frac {b \text {Subst}\left (\int \frac {a^2-2 b^2+a x}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \cos (x)\right )}{2 \left (a^2-b^2\right )} \\ & = \frac {(b-a \cos (x)) \csc ^2(x)}{2 \left (a^2-b^2\right )}-\frac {b \text {Subst}\left (\int \left (\frac {(a-b) (a+2 b)}{2 b (a+b) (b-x)}+\frac {2 b^2}{(a-b) (a+b) (a+x)}+\frac {(a-2 b) (a+b)}{2 (a-b) b (b+x)}\right ) \, dx,x,b \cos (x)\right )}{2 \left (a^2-b^2\right )} \\ & = \frac {(b-a \cos (x)) \csc ^2(x)}{2 \left (a^2-b^2\right )}+\frac {(a+2 b) \log (1-\cos (x))}{4 (a+b)^2}-\frac {(a-2 b) \log (1+\cos (x))}{4 (a-b)^2}-\frac {b^3 \log (a+b \cos (x))}{\left (a^2-b^2\right )^2} \\ \end{align*}
Time = 0.51 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.08 \[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=\frac {1}{8} \left (-\frac {\csc ^2\left (\frac {x}{2}\right )}{a+b}-\frac {4 (a-2 b) \log \left (\cos \left (\frac {x}{2}\right )\right )}{(a-b)^2}-\frac {8 b^3 \log (a+b \cos (x))}{\left (a^2-b^2\right )^2}+\frac {4 (a+2 b) \log \left (\sin \left (\frac {x}{2}\right )\right )}{(a+b)^2}+\frac {\sec ^2\left (\frac {x}{2}\right )}{a-b}\right ) \]
[In]
[Out]
Time = 0.93 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.99
method | result | size |
parallelrisch | \(\frac {-4 b^{3} \ln \left (\frac {2 \cos \left (x \right ) b +2 a}{\cos \left (x \right )+1}\right )-2 \left (a -b \right ) \left (-\left (a +2 b \right ) \left (a -b \right ) \ln \left (\csc \left (x \right )-\cot \left (x \right )\right )+\left (\cot \left (x \right ) \csc \left (x \right ) a -\frac {b \left (\cot ^{2}\left (x \right )\right )}{2}-\frac {b \left (\csc ^{2}\left (x \right )\right )}{2}\right ) \left (a +b \right )\right )}{4 \left (a -b \right )^{2} \left (a +b \right )^{2}}\) | \(91\) |
default | \(\frac {1}{\left (4 a +4 b \right ) \left (\cos \left (x \right )-1\right )}+\frac {\left (a +2 b \right ) \ln \left (\cos \left (x \right )-1\right )}{4 \left (a +b \right )^{2}}-\frac {b^{3} \ln \left (a +\cos \left (x \right ) b \right )}{\left (a +b \right )^{2} \left (a -b \right )^{2}}+\frac {1}{\left (4 a -4 b \right ) \left (\cos \left (x \right )+1\right )}+\frac {\left (-a +2 b \right ) \ln \left (\cos \left (x \right )+1\right )}{4 \left (a -b \right )^{2}}\) | \(96\) |
norman | \(\frac {-\frac {1}{8 \left (a +b \right )}+\frac {\tan ^{4}\left (\frac {x}{2}\right )}{8 a -8 b}}{\tan \left (\frac {x}{2}\right )^{2}}-\frac {b^{3} \ln \left (a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+a +b \right )}{a^{4}-2 a^{2} b^{2}+b^{4}}+\frac {\left (a +2 b \right ) \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 a^{2}+4 a b +2 b^{2}}\) | \(100\) |
risch | \(\frac {i x a}{2 a^{2}-4 a b +2 b^{2}}-\frac {i x b}{a^{2}-2 a b +b^{2}}-\frac {i x a}{2 \left (a^{2}+2 a b +b^{2}\right )}-\frac {i x b}{a^{2}+2 a b +b^{2}}+\frac {2 i x \,b^{3}}{a^{4}-2 a^{2} b^{2}+b^{4}}-\frac {a \,{\mathrm e}^{3 i x}-2 \,{\mathrm e}^{2 i x} b +a \,{\mathrm e}^{i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2} \left (-a^{2}+b^{2}\right )}-\frac {\ln \left ({\mathrm e}^{i x}+1\right ) a}{2 \left (a^{2}-2 a b +b^{2}\right )}+\frac {\ln \left ({\mathrm e}^{i x}+1\right ) b}{a^{2}-2 a b +b^{2}}+\frac {\ln \left ({\mathrm e}^{i x}-1\right ) a}{2 a^{2}+4 a b +2 b^{2}}+\frac {\ln \left ({\mathrm e}^{i x}-1\right ) b}{a^{2}+2 a b +b^{2}}-\frac {b^{3} \ln \left ({\mathrm e}^{2 i x}+\frac {2 a \,{\mathrm e}^{i x}}{b}+1\right )}{a^{4}-2 a^{2} b^{2}+b^{4}}\) | \(278\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 181 vs. \(2 (87) = 174\).
Time = 0.29 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.97 \[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=\frac {2 \, a^{2} b - 2 \, b^{3} - 2 \, {\left (a^{3} - a b^{2}\right )} \cos \left (x\right ) + 4 \, {\left (b^{3} \cos \left (x\right )^{2} - b^{3}\right )} \log \left (-b \cos \left (x\right ) - a\right ) - {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3} - {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3}\right )} \cos \left (x\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + {\left (a^{3} - 3 \, a b^{2} + 2 \, b^{3} - {\left (a^{3} - 3 \, a b^{2} + 2 \, b^{3}\right )} \cos \left (x\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{4 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (x\right )^{2}\right )}} \]
[In]
[Out]
\[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=\int \frac {\csc ^{3}{\left (x \right )}}{a + b \cos {\left (x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.25 \[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=-\frac {b^{3} \log \left (b \cos \left (x\right ) + a\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} - \frac {{\left (a - 2 \, b\right )} \log \left (\cos \left (x\right ) + 1\right )}{4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {{\left (a + 2 \, b\right )} \log \left (\cos \left (x\right ) - 1\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {a \cos \left (x\right ) - b}{2 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} + b^{2}\right )}} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.48 \[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=-\frac {b^{4} \log \left ({\left | b \cos \left (x\right ) + a \right |}\right )}{a^{4} b - 2 \, a^{2} b^{3} + b^{5}} - \frac {{\left (a - 2 \, b\right )} \log \left (\cos \left (x\right ) + 1\right )}{4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {{\left (a + 2 \, b\right )} \log \left (-\cos \left (x\right ) + 1\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} - \frac {a^{2} b - b^{3} - {\left (a^{3} - a b^{2}\right )} \cos \left (x\right )}{2 \, {\left (a + b\right )}^{2} {\left (a - b\right )}^{2} {\left (\cos \left (x\right ) + 1\right )} {\left (\cos \left (x\right ) - 1\right )}} \]
[In]
[Out]
Time = 13.34 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.22 \[ \int \frac {\csc ^3(x)}{a+b \cos (x)} \, dx=\ln \left (\cos \left (x\right )-1\right )\,\left (\frac {b}{4\,{\left (a+b\right )}^2}+\frac {1}{4\,\left (a+b\right )}\right )+\frac {\frac {b}{2\,\left (a^2-b^2\right )}-\frac {a\,\cos \left (x\right )}{2\,\left (a^2-b^2\right )}}{{\sin \left (x\right )}^2}-\frac {b^3\,\ln \left (a+b\,\cos \left (x\right )\right )}{a^4-2\,a^2\,b^2+b^4}-\frac {\ln \left (\cos \left (x\right )+1\right )\,\left (a-2\,b\right )}{4\,{\left (a-b\right )}^2} \]
[In]
[Out]